package com.witframework.web.extremetable;

import org.extremecomponents.table.core.TableModel;
import org.extremecomponents.table.view.html.BuilderConstants;
import org.extremecomponents.table.view.html.BuilderUtils;
import org.extremecomponents.util.HtmlBuilder;


/**
 * 状态条，增加了"右"栏
 * @author wuxinyang
 *
 */
public class WsStatusBar  extends TwoColumnRowLayout{
	 	public WsStatusBar(HtmlBuilder html, TableModel model) {
	 		super(html,model);
	    }
	    protected boolean showLayout(TableModel model) {
	        boolean showStatusBar = BuilderUtils.showStatusBar(model);
	        if (!showStatusBar) {
	            return false;
	        }
	        return true;
	    }
		@Override
		protected void columnLeft(HtmlBuilder html, TableModel model) {
			boolean showStatusBar = BuilderUtils.showStatusBar(model);
	        if (!showStatusBar) {
	            return;
	        }
	        html.td(4).styleClass(BuilderConstants.STATUS_BAR_CSS).close();

	        new StatusBarBuilder(html, model).statusMessage();

	        html.tdEnd();

		}
		@Override
		protected void columnRight(HtmlBuilder html, TableModel model) {
			// TODO Auto-generated method stub
		}
}
